home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / hf^k-2.dms / in.adf / MUIClass.Lha / Include / Classes / TWiMUI / Popasl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-27  |  3.8 KB  |  112 lines

  1. //
  2. //  $VER: Popasl.h      1.3 (26 Nov 1996)
  3. //
  4. //    c 1996 Thomas Wilhelmi
  5. //
  6. //
  7. // Address : Taunusstrasse 14
  8. //           61138 Niederdorfelden
  9. //           Germany
  10. //
  11. //  E-Mail : willi@twi.rhein-main.de
  12. //
  13. //   Phone : +49 (0)6101 531060
  14. //   Fax   : +49 (0)6101 531061
  15. //
  16. //
  17. //  $HISTORY:
  18. //
  19. //  16 Jun 1996 :   1.0 : first public Release
  20. //
  21. //  02 Sep 1996 :   1.2 : Neu:
  22. //                        - ClassNum() für Exception-Handling.
  23. //                        Änderungen
  24. //                        - Parameter des Copy-Konstruktor als 'const'-Parameter definiert
  25. //
  26. //  26 Nov 1996 :   1. : BugFix:
  27. //                        - Parameter von MUIPopaslStartHookEntry::StartHookEntry() korrigiert.
  28. //
  29.  
  30. #ifndef CPP_TWIMUI_POPASL_H
  31. #define CPP_TWIMUI_POPASL_H
  32.  
  33. #ifndef CPP_TWIMUI_POPSTRING_H
  34. #include <classes/twimui/popstring.h>
  35. #endif
  36.  
  37. #ifndef UTILITY_HOOKS_H
  38. #include <utility/hooks.h>
  39. #endif
  40.  
  41. class MUIPopaslStartHook
  42.     {
  43.     private:
  44.         struct Hook starthook;
  45.         static BOOL StartHookEntry(register __a0 struct Hook *, register __a2 Object *, register __a1 struct TagItem *);
  46.         virtual BOOL StartHookFunc(struct Hook *, Object *, struct TagItem *);
  47.     protected:
  48.         MUIPopaslStartHook();
  49.         MUIPopaslStartHook(const MUIPopaslStartHook &p);
  50.         ~MUIPopaslStartHook();
  51.         MUIPopaslStartHook &operator= (const MUIPopaslStartHook &);
  52.     public:
  53.         struct Hook *start() { return(&starthook); };
  54.     };
  55.  
  56. class MUIPopaslStopHook
  57.     {
  58.     private:
  59.         struct Hook stophookFile;
  60.         struct Hook stophookFont;
  61.         struct Hook stophookScreenMode;
  62.         static void StopHookEntryFile(register __a0 struct Hook *, register __a2 Object *, register __a1 struct FileRequester *);
  63.         static void StopHookEntryFont(register __a0 struct Hook *, register __a2 Object *, register __a1 struct FontRequester *);
  64.         static void StopHookEntryScreenMode(register __a0 struct Hook *, register __a2 Object *, register __a1 struct ScreenModeRequester *);
  65.         virtual void StopHookFunc(struct Hook *, Object *, struct FileRequester *);
  66.         virtual void StopHookFunc(struct Hook *, Object *, struct FontRequester *);
  67.         virtual void StopHookFunc(struct Hook *, Object *, struct ScreenModeRequester *);
  68.     protected:
  69.         MUIPopaslStopHook();
  70.         MUIPopaslStopHook(const MUIPopaslStopHook &p);
  71.         ~MUIPopaslStopHook();
  72.         MUIPopaslStopHook &operator= (const MUIPopaslStopHook &);
  73.     public:
  74.         struct Hook *stopFile() { return(&stophookFile); };
  75.         struct Hook *stopFont() { return(&stophookFont); };
  76.         struct Hook *stopScreenMode() { return(&stophookScreenMode); };
  77.     };
  78.  
  79. class MUIPopasl
  80.     :   public MUIPopstring,
  81.         public MUIPopaslStartHook,
  82.         public MUIPopaslStopHook
  83.     {
  84.     protected:
  85.         virtual const ULONG ClassNum() const;
  86.     public:
  87.         MUIPopasl(const struct TagItem *t)
  88.             :   MUIPopstring(MUIC_Popasl),
  89.                 MUIPopaslStartHook(),
  90.                 MUIPopaslStopHook()
  91.             {
  92.             init(t);
  93.             };
  94.         MUIPopasl(const Tag, ...);
  95.         MUIPopasl()
  96.             :   MUIPopstring(MUIC_Popasl),
  97.                 MUIPopaslStartHook(),
  98.                 MUIPopaslStopHook()
  99.             { };
  100.         MUIPopasl(const MUIPopasl &);
  101.         virtual ~MUIPopasl();
  102.         MUIPopasl &operator= (const MUIPopasl &);
  103.         BOOL Active() const { return((BOOL)get(MUIA_Popasl_Active,FALSE)); };
  104.         void StartHook(const struct Hook *p) { set(MUIA_Popasl_StartHook,(ULONG)p); };
  105.         struct Hook *StartHook() const { return((struct Hook *)get(MUIA_Popasl_StartHook)); };
  106.         void StopHook(const struct Hook *p) { set(MUIA_Popasl_StopHook,(ULONG)p); };
  107.         struct Hook *StopHook() const { return((struct Hook *)get(MUIA_Popasl_StopHook)); };
  108.         ULONG Type() const { return(get(MUIA_Popasl_Type,0UL)); };
  109.     };
  110.  
  111. #endif
  112.